Integrand size = 18, antiderivative size = 239 \[ \int \frac {\left (a+b \sin \left (c+d x^2\right )\right )^2}{x^4} \, dx=-\frac {2 a^2+b^2}{6 x^3}-\frac {4 a b d \cos \left (c+d x^2\right )}{3 x}+\frac {b^2 \cos \left (2 c+2 d x^2\right )}{6 x^3}+\frac {4}{3} b^2 d^{3/2} \sqrt {\pi } \cos (2 c) \operatorname {FresnelC}\left (\frac {2 \sqrt {d} x}{\sqrt {\pi }}\right )-\frac {4}{3} a b d^{3/2} \sqrt {2 \pi } \cos (c) \operatorname {FresnelS}\left (\sqrt {d} \sqrt {\frac {2}{\pi }} x\right )-\frac {4}{3} a b d^{3/2} \sqrt {2 \pi } \operatorname {FresnelC}\left (\sqrt {d} \sqrt {\frac {2}{\pi }} x\right ) \sin (c)-\frac {4}{3} b^2 d^{3/2} \sqrt {\pi } \operatorname {FresnelS}\left (\frac {2 \sqrt {d} x}{\sqrt {\pi }}\right ) \sin (2 c)-\frac {2 a b \sin \left (c+d x^2\right )}{3 x^3}-\frac {2 b^2 d \sin \left (2 c+2 d x^2\right )}{3 x} \]
1/6*(-2*a^2-b^2)/x^3-4/3*a*b*d*cos(d*x^2+c)/x+1/6*b^2*cos(2*d*x^2+2*c)/x^3 -2/3*a*b*sin(d*x^2+c)/x^3-2/3*b^2*d*sin(2*d*x^2+2*c)/x+4/3*b^2*d^(3/2)*cos (2*c)*FresnelC(2*x*d^(1/2)/Pi^(1/2))*Pi^(1/2)-4/3*b^2*d^(3/2)*FresnelS(2*x *d^(1/2)/Pi^(1/2))*sin(2*c)*Pi^(1/2)-4/3*a*b*d^(3/2)*cos(c)*FresnelS(x*d^( 1/2)*2^(1/2)/Pi^(1/2))*2^(1/2)*Pi^(1/2)-4/3*a*b*d^(3/2)*FresnelC(x*d^(1/2) *2^(1/2)/Pi^(1/2))*sin(c)*2^(1/2)*Pi^(1/2)
Time = 0.46 (sec) , antiderivative size = 226, normalized size of antiderivative = 0.95 \[ \int \frac {\left (a+b \sin \left (c+d x^2\right )\right )^2}{x^4} \, dx=-\frac {2 a^2+b^2+8 a b d x^2 \cos \left (c+d x^2\right )-b^2 \cos \left (2 \left (c+d x^2\right )\right )-8 b^2 d^{3/2} \sqrt {\pi } x^3 \cos (2 c) \operatorname {FresnelC}\left (\frac {2 \sqrt {d} x}{\sqrt {\pi }}\right )+8 a b d^{3/2} \sqrt {2 \pi } x^3 \cos (c) \operatorname {FresnelS}\left (\sqrt {d} \sqrt {\frac {2}{\pi }} x\right )+8 a b d^{3/2} \sqrt {2 \pi } x^3 \operatorname {FresnelC}\left (\sqrt {d} \sqrt {\frac {2}{\pi }} x\right ) \sin (c)+8 b^2 d^{3/2} \sqrt {\pi } x^3 \operatorname {FresnelS}\left (\frac {2 \sqrt {d} x}{\sqrt {\pi }}\right ) \sin (2 c)+4 a b \sin \left (c+d x^2\right )+4 b^2 d x^2 \sin \left (2 \left (c+d x^2\right )\right )}{6 x^3} \]
-1/6*(2*a^2 + b^2 + 8*a*b*d*x^2*Cos[c + d*x^2] - b^2*Cos[2*(c + d*x^2)] - 8*b^2*d^(3/2)*Sqrt[Pi]*x^3*Cos[2*c]*FresnelC[(2*Sqrt[d]*x)/Sqrt[Pi]] + 8*a *b*d^(3/2)*Sqrt[2*Pi]*x^3*Cos[c]*FresnelS[Sqrt[d]*Sqrt[2/Pi]*x] + 8*a*b*d^ (3/2)*Sqrt[2*Pi]*x^3*FresnelC[Sqrt[d]*Sqrt[2/Pi]*x]*Sin[c] + 8*b^2*d^(3/2) *Sqrt[Pi]*x^3*FresnelS[(2*Sqrt[d]*x)/Sqrt[Pi]]*Sin[2*c] + 4*a*b*Sin[c + d* x^2] + 4*b^2*d*x^2*Sin[2*(c + d*x^2)])/x^3
Time = 0.41 (sec) , antiderivative size = 239, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3884, 6, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\left (a+b \sin \left (c+d x^2\right )\right )^2}{x^4} \, dx\) |
\(\Big \downarrow \) 3884 |
\(\displaystyle \int \left (\frac {a^2}{x^4}+\frac {2 a b \sin \left (c+d x^2\right )}{x^4}-\frac {b^2 \cos \left (2 c+2 d x^2\right )}{2 x^4}+\frac {b^2}{2 x^4}\right )dx\) |
\(\Big \downarrow \) 6 |
\(\displaystyle \int \left (\frac {a^2+\frac {b^2}{2}}{x^4}+\frac {2 a b \sin \left (c+d x^2\right )}{x^4}-\frac {b^2 \cos \left (2 c+2 d x^2\right )}{2 x^4}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {2 a^2+b^2}{6 x^3}-\frac {4}{3} \sqrt {2 \pi } a b d^{3/2} \sin (c) \operatorname {FresnelC}\left (\sqrt {d} \sqrt {\frac {2}{\pi }} x\right )-\frac {4}{3} \sqrt {2 \pi } a b d^{3/2} \cos (c) \operatorname {FresnelS}\left (\sqrt {d} \sqrt {\frac {2}{\pi }} x\right )-\frac {4 a b d \cos \left (c+d x^2\right )}{3 x}-\frac {2 a b \sin \left (c+d x^2\right )}{3 x^3}+\frac {4}{3} \sqrt {\pi } b^2 d^{3/2} \cos (2 c) \operatorname {FresnelC}\left (\frac {2 \sqrt {d} x}{\sqrt {\pi }}\right )-\frac {4}{3} \sqrt {\pi } b^2 d^{3/2} \sin (2 c) \operatorname {FresnelS}\left (\frac {2 \sqrt {d} x}{\sqrt {\pi }}\right )-\frac {2 b^2 d \sin \left (2 c+2 d x^2\right )}{3 x}+\frac {b^2 \cos \left (2 c+2 d x^2\right )}{6 x^3}\) |
-1/6*(2*a^2 + b^2)/x^3 - (4*a*b*d*Cos[c + d*x^2])/(3*x) + (b^2*Cos[2*c + 2 *d*x^2])/(6*x^3) + (4*b^2*d^(3/2)*Sqrt[Pi]*Cos[2*c]*FresnelC[(2*Sqrt[d]*x) /Sqrt[Pi]])/3 - (4*a*b*d^(3/2)*Sqrt[2*Pi]*Cos[c]*FresnelS[Sqrt[d]*Sqrt[2/P i]*x])/3 - (4*a*b*d^(3/2)*Sqrt[2*Pi]*FresnelC[Sqrt[d]*Sqrt[2/Pi]*x]*Sin[c] )/3 - (4*b^2*d^(3/2)*Sqrt[Pi]*FresnelS[(2*Sqrt[d]*x)/Sqrt[Pi]]*Sin[2*c])/3 - (2*a*b*Sin[c + d*x^2])/(3*x^3) - (2*b^2*d*Sin[2*c + 2*d*x^2])/(3*x)
3.1.22.3.1 Defintions of rubi rules used
Int[(u_.)*((v_.) + (a_.)*(Fx_) + (b_.)*(Fx_))^(p_.), x_Symbol] :> Int[u*(v + (a + b)*Fx)^p, x] /; FreeQ[{a, b}, x] && !FreeQ[Fx, x]
Int[((e_.)*(x_))^(m_.)*((a_.) + (b_.)*Sin[(c_.) + (d_.)*(x_)^(n_)])^(p_), x _Symbol] :> Int[ExpandTrigReduce[(e*x)^m, (a + b*Sin[c + d*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && IGtQ[p, 1] && IGtQ[n, 0]
Time = 0.25 (sec) , antiderivative size = 173, normalized size of antiderivative = 0.72
method | result | size |
parts | \(-\frac {a^{2}}{3 x^{3}}+b^{2} \left (-\frac {1}{6 x^{3}}+\frac {\cos \left (2 d \,x^{2}+2 c \right )}{6 x^{3}}+\frac {2 d \left (-\frac {\sin \left (2 d \,x^{2}+2 c \right )}{x}+2 \sqrt {d}\, \sqrt {\pi }\, \left (\cos \left (2 c \right ) \operatorname {C}\left (\frac {2 x \sqrt {d}}{\sqrt {\pi }}\right )-\sin \left (2 c \right ) \operatorname {S}\left (\frac {2 x \sqrt {d}}{\sqrt {\pi }}\right )\right )\right )}{3}\right )+2 a b \left (-\frac {\sin \left (d \,x^{2}+c \right )}{3 x^{3}}+\frac {2 d \left (-\frac {\cos \left (d \,x^{2}+c \right )}{x}-\sqrt {d}\, \sqrt {2}\, \sqrt {\pi }\, \left (\cos \left (c \right ) \operatorname {S}\left (\frac {x \sqrt {d}\, \sqrt {2}}{\sqrt {\pi }}\right )+\sin \left (c \right ) \operatorname {C}\left (\frac {x \sqrt {d}\, \sqrt {2}}{\sqrt {\pi }}\right )\right )\right )}{3}\right )\) | \(173\) |
default | \(-\frac {a^{2}+\frac {b^{2}}{2}}{3 x^{3}}-\frac {b^{2} \left (-\frac {\cos \left (2 d \,x^{2}+2 c \right )}{3 x^{3}}-\frac {4 d \left (-\frac {\sin \left (2 d \,x^{2}+2 c \right )}{x}+2 \sqrt {d}\, \sqrt {\pi }\, \left (\cos \left (2 c \right ) \operatorname {C}\left (\frac {2 x \sqrt {d}}{\sqrt {\pi }}\right )-\sin \left (2 c \right ) \operatorname {S}\left (\frac {2 x \sqrt {d}}{\sqrt {\pi }}\right )\right )\right )}{3}\right )}{2}+2 a b \left (-\frac {\sin \left (d \,x^{2}+c \right )}{3 x^{3}}+\frac {2 d \left (-\frac {\cos \left (d \,x^{2}+c \right )}{x}-\sqrt {d}\, \sqrt {2}\, \sqrt {\pi }\, \left (\cos \left (c \right ) \operatorname {S}\left (\frac {x \sqrt {d}\, \sqrt {2}}{\sqrt {\pi }}\right )+\sin \left (c \right ) \operatorname {C}\left (\frac {x \sqrt {d}\, \sqrt {2}}{\sqrt {\pi }}\right )\right )\right )}{3}\right )\) | \(175\) |
risch | \(-\frac {2 i a b \,d^{2} \sqrt {\pi }\, \operatorname {erf}\left (\sqrt {i d}\, x \right ) {\mathrm e}^{-i c}}{3 \sqrt {i d}}-\frac {a^{2}}{3 x^{3}}-\frac {b^{2}}{6 x^{3}}+\frac {b^{2} d^{2} \sqrt {\pi }\, \sqrt {2}\, \operatorname {erf}\left (\sqrt {2}\, \sqrt {i d}\, x \right ) {\mathrm e}^{-2 i c}}{3 \sqrt {i d}}+\frac {2 b^{2} d^{2} \sqrt {\pi }\, \operatorname {erf}\left (\sqrt {-2 i d}\, x \right ) {\mathrm e}^{2 i c}}{3 \sqrt {-2 i d}}+\frac {2 i a b \,d^{2} \sqrt {\pi }\, \operatorname {erf}\left (\sqrt {-i d}\, x \right ) {\mathrm e}^{i c}}{3 \sqrt {-i d}}-\frac {4 a b d \cos \left (d \,x^{2}+c \right )}{3 x}-\frac {2 a b \sin \left (d \,x^{2}+c \right )}{3 x^{3}}+\frac {b^{2} \cos \left (2 d \,x^{2}+2 c \right )}{6 x^{3}}-\frac {2 b^{2} d \sin \left (2 d \,x^{2}+2 c \right )}{3 x}\) | \(218\) |
-1/3/x^3*a^2+b^2*(-1/6/x^3+1/6/x^3*cos(2*d*x^2+2*c)+2/3*d*(-1/x*sin(2*d*x^ 2+2*c)+2*d^(1/2)*Pi^(1/2)*(cos(2*c)*FresnelC(2*x*d^(1/2)/Pi^(1/2))-sin(2*c )*FresnelS(2*x*d^(1/2)/Pi^(1/2)))))+2*a*b*(-1/3*sin(d*x^2+c)/x^3+2/3*d*(-1 /x*cos(d*x^2+c)-d^(1/2)*2^(1/2)*Pi^(1/2)*(cos(c)*FresnelS(x*d^(1/2)*2^(1/2 )/Pi^(1/2))+sin(c)*FresnelC(x*d^(1/2)*2^(1/2)/Pi^(1/2)))))
Time = 0.28 (sec) , antiderivative size = 206, normalized size of antiderivative = 0.86 \[ \int \frac {\left (a+b \sin \left (c+d x^2\right )\right )^2}{x^4} \, dx=-\frac {4 \, \sqrt {2} \pi a b d x^{3} \sqrt {\frac {d}{\pi }} \cos \left (c\right ) \operatorname {S}\left (\sqrt {2} x \sqrt {\frac {d}{\pi }}\right ) + 4 \, \sqrt {2} \pi a b d x^{3} \sqrt {\frac {d}{\pi }} \operatorname {C}\left (\sqrt {2} x \sqrt {\frac {d}{\pi }}\right ) \sin \left (c\right ) - 4 \, \pi b^{2} d x^{3} \sqrt {\frac {d}{\pi }} \cos \left (2 \, c\right ) \operatorname {C}\left (2 \, x \sqrt {\frac {d}{\pi }}\right ) + 4 \, \pi b^{2} d x^{3} \sqrt {\frac {d}{\pi }} \operatorname {S}\left (2 \, x \sqrt {\frac {d}{\pi }}\right ) \sin \left (2 \, c\right ) + 4 \, a b d x^{2} \cos \left (d x^{2} + c\right ) - b^{2} \cos \left (d x^{2} + c\right )^{2} + a^{2} + b^{2} + 2 \, {\left (2 \, b^{2} d x^{2} \cos \left (d x^{2} + c\right ) + a b\right )} \sin \left (d x^{2} + c\right )}{3 \, x^{3}} \]
-1/3*(4*sqrt(2)*pi*a*b*d*x^3*sqrt(d/pi)*cos(c)*fresnel_sin(sqrt(2)*x*sqrt( d/pi)) + 4*sqrt(2)*pi*a*b*d*x^3*sqrt(d/pi)*fresnel_cos(sqrt(2)*x*sqrt(d/pi ))*sin(c) - 4*pi*b^2*d*x^3*sqrt(d/pi)*cos(2*c)*fresnel_cos(2*x*sqrt(d/pi)) + 4*pi*b^2*d*x^3*sqrt(d/pi)*fresnel_sin(2*x*sqrt(d/pi))*sin(2*c) + 4*a*b* d*x^2*cos(d*x^2 + c) - b^2*cos(d*x^2 + c)^2 + a^2 + b^2 + 2*(2*b^2*d*x^2*c os(d*x^2 + c) + a*b)*sin(d*x^2 + c))/x^3
\[ \int \frac {\left (a+b \sin \left (c+d x^2\right )\right )^2}{x^4} \, dx=\int \frac {\left (a + b \sin {\left (c + d x^{2} \right )}\right )^{2}}{x^{4}}\, dx \]
Result contains complex when optimal does not.
Time = 0.46 (sec) , antiderivative size = 176, normalized size of antiderivative = 0.74 \[ \int \frac {\left (a+b \sin \left (c+d x^2\right )\right )^2}{x^4} \, dx=-\frac {\sqrt {d x^{2}} {\left ({\left (-\left (i + 1\right ) \, \sqrt {2} \Gamma \left (-\frac {3}{2}, i \, d x^{2}\right ) + \left (i - 1\right ) \, \sqrt {2} \Gamma \left (-\frac {3}{2}, -i \, d x^{2}\right )\right )} \cos \left (c\right ) + {\left (\left (i - 1\right ) \, \sqrt {2} \Gamma \left (-\frac {3}{2}, i \, d x^{2}\right ) - \left (i + 1\right ) \, \sqrt {2} \Gamma \left (-\frac {3}{2}, -i \, d x^{2}\right )\right )} \sin \left (c\right )\right )} a b d}{4 \, x} - \frac {{\left (3 \, \sqrt {2} \sqrt {d x^{2}} {\left ({\left (-\left (i - 1\right ) \, \sqrt {2} \Gamma \left (-\frac {3}{2}, 2 i \, d x^{2}\right ) + \left (i + 1\right ) \, \sqrt {2} \Gamma \left (-\frac {3}{2}, -2 i \, d x^{2}\right )\right )} \cos \left (2 \, c\right ) + {\left (-\left (i + 1\right ) \, \sqrt {2} \Gamma \left (-\frac {3}{2}, 2 i \, d x^{2}\right ) + \left (i - 1\right ) \, \sqrt {2} \Gamma \left (-\frac {3}{2}, -2 i \, d x^{2}\right )\right )} \sin \left (2 \, c\right )\right )} d x^{2} + 4\right )} b^{2}}{24 \, x^{3}} - \frac {a^{2}}{3 \, x^{3}} \]
-1/4*sqrt(d*x^2)*((-(I + 1)*sqrt(2)*gamma(-3/2, I*d*x^2) + (I - 1)*sqrt(2) *gamma(-3/2, -I*d*x^2))*cos(c) + ((I - 1)*sqrt(2)*gamma(-3/2, I*d*x^2) - ( I + 1)*sqrt(2)*gamma(-3/2, -I*d*x^2))*sin(c))*a*b*d/x - 1/24*(3*sqrt(2)*sq rt(d*x^2)*((-(I - 1)*sqrt(2)*gamma(-3/2, 2*I*d*x^2) + (I + 1)*sqrt(2)*gamm a(-3/2, -2*I*d*x^2))*cos(2*c) + (-(I + 1)*sqrt(2)*gamma(-3/2, 2*I*d*x^2) + (I - 1)*sqrt(2)*gamma(-3/2, -2*I*d*x^2))*sin(2*c))*d*x^2 + 4)*b^2/x^3 - 1 /3*a^2/x^3
\[ \int \frac {\left (a+b \sin \left (c+d x^2\right )\right )^2}{x^4} \, dx=\int { \frac {{\left (b \sin \left (d x^{2} + c\right ) + a\right )}^{2}}{x^{4}} \,d x } \]
Timed out. \[ \int \frac {\left (a+b \sin \left (c+d x^2\right )\right )^2}{x^4} \, dx=\int \frac {{\left (a+b\,\sin \left (d\,x^2+c\right )\right )}^2}{x^4} \,d x \]